package com.ap.generator.common;

import com.ap.core.cxf.jaxb.common.AbstractResponseStatusTypeGeneratorBuilder;
import com.ap.core.cxf.jaxb.common.ResponseCode;
import com.ap.datagen.core.GeneratorHelper;
import com.ap.datagen.core.Nullable;

import static com.ap.datagen.core.GeneratorHelper.fixedValueGenerator;
import static com.ap.datagen.core.Nullable.nullable;

/**
 * 
 * @author Siva.Pochana
 *
 */
public class ResponseStatusTypeGeneratorBuilder extends
		AbstractResponseStatusTypeGeneratorBuilder {

	/**
	 * 
	 */
	@Override
	public void setupDefaults() {
		this.responseCodeGenerator = Nullable.nullable(GeneratorHelper.randomGeneratorFromEnum(ResponseCode.SUCCESSFUL));
	}

	/**
	 * 
	 * @return
	 */
	public static ResponseStatusTypeGeneratorBuilder getResponseStatusTypeGenerator() {
		return new ResponseStatusTypeGeneratorBuilder();
	}
	
	/**
	 * 
	 *
     * @param value
     * @return
	 */
	public ResponseStatusTypeGeneratorBuilder withResponseCode(ResponseCode value) {
        this.responseCodeGenerator = nullable(fixedValueGenerator(value));
        return this;
    }
}
